<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.time.php';
require '../visual/visual.tasks.php';
require '../core/core.dfs.php';
require '../visual/visual.dfs.php';
require '../core/core.jobs.php';
$i=1;
//echo $_GET['q'];

$login=new core_security;
if ($login->checklogin()=="OK") {
$_POST['jobpath']=$_POST['jobpath'];
$job=new core_job;
$query="select id,users from tree where disabled != 1";
$result=mysql_query($query);
while ($row=mysql_fetch_array($result)) {
	$users=explode(",",$row['users']);
	if (in_array($_SESSION['login'], $users))	{
		$job->jid=$row['id'];
		if ($_POST['jobpath'] == $job->returnjobpath()) {		
			echo $row['id'];
			
			}	
		}	
	} 

}
?>